@echo off
setlocal enabledelayedexpansion
set "SUFFIX=.jar"
set binPath=%~dp0
cd ..
set "SEARCH_PATH=%cd%
 
echo Searching for files with %SUFFIX% extension in %SEARCH_PATH%...
for /r "%SEARCH_PATH%" %%f in (*%SUFFIX%) do (
   echo %%~dpnxf
)
 
endlocal

pause